package com.alan.designMode.proxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * Created by Alan on 17-8-29
 */
public class GamePlayIH implements InvocationHandler{

    //被代理者
    Class cls = null;

    //被代理的实例
    Object obj = null;

    public GamePlayIH(Object _obj){
        this.obj = _obj;
    }

    //调用被代理的方法
    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        Object result = method.invoke(this.obj,args);
        return result;
    }
}
